﻿dofile = function(file)
	engine.script(file)
end

_OnReady = function()
	engine.script('menu.lua')
end
_OnUpdate = function(dt)
	if updateLight ~= nil then updateLight() end
end
_OnInput = function(name, param)
	if name == 'event' then
		if (param.value | 0x01000000) ~= 0 and scene.type('__gizmo') == 'gizmo' then
			engine.execute('__GetTransform', scene.handle('__gizmo', 'GetTransform'))
		end
	elseif name == 'fire' then
		if param.button == 1 then
			_hideMenu()
		elseif param.button == 2 then
			local x, y, z, dx, dy, dz = graphics.pickingRay(param.x, param.y)
			local node, x, y, z = scene.pick(x, y, z, dx, dy, dz)
			if node ~= nil then
				_showMenu(node, x, y, z)
			end
		end
	end
end
_OnExit = function()
end

OnReady = _OnReady
OnUpdate = _OnUpdate
OnInput = _OnInput
OnExit = _OnExit
